/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kleintjes.behavioral.strategy_pattern.model;

import com.kleintjes.behavioral.strategy_pattern.Strategy;

/**
 *
 * @author Hughan.Kleintjes.hughanK@gmail.com
 */
public class Context {
    
    int temperatureInF;
    Strategy strategy;
    
    public Context(int temperatureInF, Strategy strategy)
    {
        this.temperatureInF = temperatureInF;
        this.strategy = strategy;
    }
    
    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    public int getTemperatureInF() {
        return temperatureInF;
    }

    public void setTemperatureInF(int temperatureInF) {
        this.temperatureInF = temperatureInF;
    }
    
    public boolean getResult() {
        return strategy.checkTemperature(temperatureInF);
    }
    
}
